package com.sgb.kjwl.di.material;

import com.sgb.kjwl.repository.MaterialRepertory;
import com.sgb.kjwl.repository.impl.MaterialRepertoryImpl;
import com.sgb.kjwl.view.ui.activity.material.CommercialConcreteListActivity;
import com.sgb.kjwl.view.ui.activity.material.CommercialConcreteListActivity3;
import com.sgb.kjwl.view.ui.activity.material.ConcreteDetailActivity;
import com.sgb.kjwl.view.ui.activity.material.ConcreteDetailActivity2;
import com.sgb.kjwl.view.ui.activity.material.MaterialListActivity;
import com.sgb.kjwl.view.ui.activity.self.shop.ShopGoodsDetailActivity;
import com.sgb.kjwl.view.ui.activity.self.shop.ShopGoodsInfoActivity;
import com.sgb.kjwl.viewmodel.material.CommercialConcreteListModel;
import com.sgb.kjwl.viewmodel.material.CommercialConcreteListModel3;
import com.sgb.kjwl.viewmodel.material.ConcreteDetailModel;
import com.sgb.kjwl.viewmodel.material.MaterialListModel;
import com.sgb.kjwl.viewmodel.material.ShopGoodsDetailModel;
import com.sgb.kjwl.viewmodel.shopping.ShopGoodsModel;
import com.swgk.core.base.di.Activity;
import com.swgk.core.base.api.BaseApiSource;
import com.swgk.core.base.model.preference.BasePreferenceSource;

import dagger.Module;
import dagger.Provides;

@Module
public class MaterialModule {
    private MaterialListActivity materialListActivity;
    private ShopGoodsInfoActivity shopGoodsInfoActivity;
    private CommercialConcreteListActivity commercialConcreteListActivity;
    private ConcreteDetailActivity concreteDetailActivity;
    private ConcreteDetailActivity2 concreteDetailActivity2;
    private CommercialConcreteListActivity3 commercialConcreteListActivity3;
    private ShopGoodsDetailActivity shopGoodsDetailActivity;


    public MaterialModule(MaterialListActivity materialListActivity) {
        this.materialListActivity = materialListActivity;
    }

    public MaterialModule(ShopGoodsInfoActivity shopGoodsInfoActivity) {
        this.shopGoodsInfoActivity = shopGoodsInfoActivity;
    }

    public MaterialModule(CommercialConcreteListActivity commercialConcreteListActivity) {
        this.commercialConcreteListActivity = commercialConcreteListActivity;
    }

    public MaterialModule(ConcreteDetailActivity concreteDetailActivity) {
        this.concreteDetailActivity = concreteDetailActivity;
    }

    public MaterialModule(ConcreteDetailActivity2 concreteDetailActivity2) {
        this.concreteDetailActivity2 = concreteDetailActivity2;
    }

    public MaterialModule(CommercialConcreteListActivity3 commercialConcreteListActivity3) {
        this.commercialConcreteListActivity3 = commercialConcreteListActivity3;
    }

    public MaterialModule(ShopGoodsDetailActivity shopGoodsDetailActivity) {
        this.shopGoodsDetailActivity = shopGoodsDetailActivity;
    }


    @Provides
    @Activity
    MaterialRepertory provideMaterialRepertory(BaseApiSource apiSource, BasePreferenceSource preferenceSource) {
        return new MaterialRepertoryImpl(apiSource, preferenceSource);
    }

    @Provides
    @Activity
    MaterialListModel provideMaterialListModel(MaterialRepertory repertory) {
        return new MaterialListModel(materialListActivity, repertory);
    }

    @Provides
    @Activity
    ShopGoodsModel provideShopGoodsModel(MaterialRepertory repertory) {
        return new ShopGoodsModel(shopGoodsInfoActivity, repertory);
    }

    @Provides
    @Activity
    CommercialConcreteListModel commercialConcreteListModel(MaterialRepertory repertory) {
        return new CommercialConcreteListModel(commercialConcreteListActivity, repertory);
    }

    @Provides
    @Activity
    CommercialConcreteListModel3 commercialConcreteListModel3(MaterialRepertory repertory) {
        return new CommercialConcreteListModel3(commercialConcreteListActivity3, repertory);
    }

    @Provides
    @Activity
    ConcreteDetailModel provideConcreteDetailModel(MaterialRepertory repertory) {
        return new ConcreteDetailModel(concreteDetailActivity2, repertory);
    }

    @Provides
    @Activity
    ShopGoodsDetailModel shopGoodsDetailModel(MaterialRepertory repertory) {
        return new ShopGoodsDetailModel(shopGoodsDetailActivity, repertory);
    }

}
